home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Development Platforms / CSMP Digests / csmp-v1-002.txt < prev    next >
Encoding:
Text File  |  1992-11-18  |  54.8 KB  |  1,552 lines  |  [TEXT/MPS ]

  1. C.S.M.P. Digest             Sun, 08 Mar 92       Volume 1 : Issue 2
  2.  
  3. Today's Topics:
  4.  
  5.     Is (any version of) ResEdit Public Domain?  If so, how do I get it?
  6.     Why would Lsearch Fail?
  7.     Differences between Think C and MPW C
  8.     Hierarchical Menus in Think C and TCL
  9.     Beta test available - DarkSide 3.0
  10.     TCP/IP Library for Macintosh
  11.     Calling SndDoCommand at interrupt time
  12.     Making Folders
  13.     Putting the drive to sleep on a powerbook
  14.     CWindowPtr or WindowPtr ?
  15.     Trashing menu bar
  16.     Command Mac database format?
  17.     Sockets lib wanted for MacTCP
  18.     Quickdraw - PICT question
  19.     Auto Pop (why?)
  20.     MS Mail XCMDs or Externals?
  21.     ERead() completion woes
  22.  
  23.  
  24. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  25.  
  26. These digests are available (by using FTP, account anonymous, your email
  27. address as password) in the pub/mac directory on ftp.cs.uoregon.edu.
  28. This is also the home of the comp.sys.mac.programmer Frequently Asked
  29. Questions list.
  30.  
  31. The articles in these digests are taken directly from comp.sys.mac.programmer.
  32. They are not edited; all articles included in this digest are in their original
  33. posted form.  The only articles that are -not- included in these digests are
  34. those which didn't receive any replies (except those that give information
  35. rather than ask a question).  All replies to each article are concatenated
  36. onto the original article in the order in which they were received.  Article
  37. threads are not added to the digests until the last article added to the
  38. thread is at least one month old (this is to ensure that the thread is dead
  39. before adding it to the digests).
  40.  
  41. Send administrative mail to mkelly@cs.uoregon.edu.
  42.  
  43. -------------------------------------------------------
  44.  
  45. From: tony@scotty.dccs.upenn.edu (Anthony Olejnik)
  46. Subject: Is (any version of) ResEdit Public Domain?  If so, how do I get it?
  47. Date: 23 Jan 92 14:11:29 GMT
  48. Organization: University of Pennsylvania
  49.  
  50. I squeezed my questions into the subject line.
  51.  
  52. I`d like to obtain a copy and give it out to my friends
  53. (but only if its Public Domain).
  54.  
  55. I saw in a store what looks like a book on ResEdit which
  56. contains the application.  However, I'm not sure if the
  57. application is Public Domain or not.
  58.  
  59. Any help would be greatly appreciated.
  60.  
  61. Thanks in advance.
  62.  
  63. --tony
  64.  
  65.  
  66.  
  67. - -------------------------
  68.  
  69. From: e-sink@uiuc.edu (Eric W. Sink)
  70. Subject:  Is (any version of) ResEdit Public Domain? If so, how do I get it?
  71. Date: 23 Jan 92 16:16:15 GMT
  72. Organization: University of Illinois at Urbana-Champaign
  73.  
  74. In <63359@netnews.upenn.edu> tony@scotty.dccs.upenn.edu (Anthony Olejnik) writes:
  75.  
  76. >I`d like to obtain a copy and give it out to my friends
  77. >(but only if its Public Domain).
  78.  
  79. >I saw in a store what looks like a book on ResEdit which
  80. >contains the application.  However, I'm not sure if the
  81. >application is Public Domain or not.
  82.  
  83. ResEdit is not public domain.  Public domain means devoid of copyright.
  84. ResEdit is copyrighted.  It is also freely available by anon ftp from
  85. ftp.apple.com.  This does not mean you can give copies away, nor does
  86. it mean you cannot.  There is a license agreement in the package.
  87. Read it carefully.
  88.  
  89. -- 
  90. Eric W. Sink,  Spatial Analysis and Systems Team
  91. USACERL, P.O. Box 9005, Champaign, IL 61826-9005
  92. 1-800-USA-CERL x449,   e-sink@uiuc.edu
  93.  
  94.  
  95.  
  96. ---------------------------
  97.  
  98. From: mxmora@unix.sri.com (Matthew Xavier Mora)
  99. Subject: Why would Lsearch Fail?
  100. Date: 23 Jan 92 01:07:14 GMT
  101. Organization: SRI International
  102.  
  103. I'm having problems with the list manager. Anytime lsearch is called
  104. it seem to never find the string? Anyone run into this? Is the list
  105. somehow trashed?
  106.  
  107. Thanks for any info you can give.
  108.  
  109. -- 
  110. +----------------------------------------------------------------------------+
  111. |Matthew Xavier Mora                                     mxmora@unix.sri.com |
  112. |SRI International                                      Matt_Mora@qm.sri.com |
  113. |                                                                            |
  114. |   sent using NewsWatcher version 1.0.3.b2(mxm)                             |
  115. +----------------------------------------------------------------------------+
  116.  
  117.  
  118.  
  119. - -------------------------
  120.  
  121. From: merk@aerospace.aero.org
  122. Subject:  Why would Lsearch Fail?
  123. Date: 23 Jan 92 17:47:01 GMT
  124. Organization: The Aerospace Corporation
  125.  
  126. In article <31584@unix.SRI.COM> mxmora@unix.sri.com (Matthew Xavier Mora)
  127. writes:
  128. >I'm having problems with the list manager. Anytime lsearch is called
  129. >it seem to never find the string? Anyone run into this? Is the list
  130. >somehow trashed?
  131. >
  132.  
  133. >From IM:
  134.  
  135.     LSearch searches for the first cell greater than or equal to theCell
  136. that contains the specified data.
  137.  
  138. I had this problem when I forgot to initialize theCell before using it.
  139. It was a simple mistake but cost me a lot of heartache!  This is especially
  140. a problem if you are upgrading from THINK 4.x to 5.x because theCell changed
  141. from a long to a Point.
  142.  
  143.  
  144.  
  145. - -------------------------
  146.  
  147. From: mxmora@unix.SRI.COM (Matt Mora)
  148. Subject:  Why would Lsearch Fail?
  149. Date: 23 Jan 92 21:29:26 GMT
  150. Organization: SRI International, Menlo Park, CA
  151.  
  152. In article <1992Jan23.174701.26346@speedy.aero.org> merk@aerospace.aero.org writes:
  153. >In article <31584@unix.SRI.COM> mxmora@unix.sri.com (Matthew Xavier Mora)
  154. >writes:
  155. >>I'm having problems with the list manager. Anytime lsearch is called
  156. >>it seem to never find the string? Anyone run into this? Is the list
  157. >>somehow trashed?
  158.  
  159. >From IM:
  160.  
  161. >    LSearch searches for the first cell greater than or equal to theCell
  162. >that contains the specified data.
  163.  
  164. >I had this problem when I forgot to initialize theCell before using it.
  165. >It was a simple mistake but cost me a lot of heartache!  This is especially
  166. >a problem if you are upgrading from THINK 4.x to 5.x because theCell changed
  167. >from a long to a Point.
  168.  
  169. Wouldn't the compiler complain about the type difference?
  170. I have the compiler (TC 5.0.x) set to ansi compatible mode and the 
  171. program will compile and run. 
  172.  
  173. The problem seems to be with the Search proc included for lsearch.
  174. When I trace through the search proc and I get top the call
  175. IUMagIDString, it doesn't return a one or a zero. It returns some
  176. positive integer.  
  177.  
  178. according to IM:
  179.  
  180. "IUEqualString comapares aStr and bStr for equality without regard
  181. for secondary ordering, as described above under "international String
  182. Comparison". If the strings are equal, it returns 0; otherwise, it
  183. returns 1."
  184.  
  185. IM says:
  186.  
  187. "IUMagIDString is the same as IUEqualString except that instead of comparing 
  188. two Pascal strings, it compares the string defined by aPtr and aLen to the 
  189. string defined by bPtr and bLen."
  190.  
  191. All the parameters going into IUMagIDString appear to be ok but the result
  192. is funny. HELP!
  193.  
  194.  
  195. Matt
  196.  
  197. -- 
  198. ___________________________________________________________
  199. Matthew Mora                |   my Mac  Matt_Mora@sri.com
  200. SRI International           |  my unix  mxmora@unix.sri.com
  201. ___________________________________________________________
  202.  
  203.  
  204.  
  205. ---------------------------
  206.  
  207. From: mxmora@unix.sri.com (Matthew Xavier Mora)
  208. Subject: Differences between Think C and MPW C
  209. Date: 23 Jan 92 01:13:47 GMT
  210. Organization: SRI International
  211.  
  212.  
  213. What are the differences between MPW and the THINK environments
  214. that I should know about. I think some of the problems I'm having with 
  215. modifying Newswatcher is that NW was originally written for MPW. What options
  216. do I have to set in the project to make it compatible with MPW? I'm using
  217. TC 5.0.x
  218.  
  219. Thanks
  220.  
  221. Matt
  222.  
  223. -- 
  224. +----------------------------------------------------------------------------+
  225. |Matthew Xavier Mora                                     mxmora@unix.sri.com |
  226. |SRI International                                      Matt_Mora@qm.sri.com |
  227. |                                                                            |
  228. |   sent using NewsWatcher version 1.0.3.b2(mxm)                             |
  229. +----------------------------------------------------------------------------+
  230.  
  231.  
  232.  
  233. - -------------------------
  234.  
  235. From: e-sink@uiuc.edu (Eric W. Sink)
  236. Subject:  Differences between Think C and MPW C
  237. Date: 23 Jan 92 16:14:11 GMT
  238. Organization: University of Illinois at Urbana-Champaign
  239.  
  240. In <31585@unix.SRI.COM> mxmora@unix.sri.com (Matthew Xavier Mora) writes:
  241.  
  242.  
  243. >What are the differences between MPW and the THINK environments
  244. >that I should know about. I think some of the problems I'm having with 
  245. >modifying Newswatcher is that NW was originally written for MPW. What options
  246. >do I have to set in the project to make it compatible with MPW? I'm using
  247. >TC 5.0.x
  248.  
  249. Well, it's not really possible to just set options to make Think C totally
  250. compatible with MPW, but it would be a good idea to consider the following:
  251.  
  252. Turn on 4 byte ints.  MPW ints are 4 bytes, along with most of the rest
  253. of the world.  BTW, when you do this, all your calls to the ANSI library
  254. are potential crashes.  Therefore, you should make a copy of the ANSI
  255. library, and rebuild it with 4 byte ints.  I call mine, ANSI-4byte.
  256.  
  257. Keep in mind that Think C ignores the #pragma segment directive.
  258.  
  259. I think there's a section of the Think C manual that talks about porting
  260. code from MPW, isn't there ?  Not sure...
  261.  
  262. -- 
  263. Eric W. Sink,  Spatial Analysis and Systems Team
  264. USACERL, P.O. Box 9005, Champaign, IL 61826-9005
  265. 1-800-USA-CERL x449,   e-sink@uiuc.edu
  266.  
  267.  
  268.  
  269. - -------------------------
  270.  
  271. From: ross@bnr.ca (Ross Brown)
  272. Subject:  Differences between Think C and MPW C
  273. Organization: Bell-Northern Research
  274. Date: Fri, 24 Jan 92 19:11:42 GMT
  275.  
  276. >In <31585@unix.SRI.COM> mxmora@unix.sri.com (Matthew Xavier Mora) writes:
  277. >
  278. >
  279. >>What are the differences between MPW and the THINK environments
  280. >>that I should know about. I think some of the problems I'm having with 
  281. >>modifying Newswatcher is that NW was originally written for MPW. What options
  282. >>do I have to set in the project to make it compatible with MPW? I'm using
  283. >>TC 5.0.x
  284.  
  285. Here's one:  In MPW, '\n' is 0x0D and '\r' is 0x0A.  In Think C and the rest of
  286. the C universe, the assignments are the reverse.  According to MPW
  287. documentation, this is done because TextEdit and other Mac managers regard 0x0D
  288. as the newline character.  (In earlier versions, '\r' was 0x0D too.) 
  289. Apparently Think did some extra fiddling to make their assignments work
  290. properly.
  291.  
  292. As long as your code does not assume what the values are, your source should be
  293. portable.  If, however, you have a table mapping ASCII codes to character
  294. types, or something like that, you will run into trouble.
  295.  
  296. Ross Brown
  297. Bell-Northern Research Ltd.
  298. Ottawa, Ontario, Canada
  299. ross@bnr.ca
  300. Opinions expressed do not necessarily represent those of BNR.
  301.  
  302.  
  303.  
  304. ---------------------------
  305.  
  306. From: dmmg1176@uxa.cso.uiuc.edu (David M Marcovitz)
  307. Subject: Hierarchical Menus in Think C and TCL
  308. Date: 23 Jan 92 16:50:30 GMT
  309. Organization: University of Illinois at Urbana
  310.  
  311. I have been unable to get hierarchical menus to work with Think C
  312. 5.0.2 and TCL 1.1.2.  I have followed the instructions in the Think C
  313. manual, and I have followed the example from the Art Class Project (it
  314. has hierarchical Font and Size menus), but I still can't get it to
  315. work.
  316.  
  317. The problem manifests itself when I have an EditText object as my
  318. gopher.  When this is the case and update menus tries to do
  319. checkmarking to get the handle of any menu, my program crashes.  I am
  320. really frustrated with this.  Please help!  Any suggestions would be
  321. appreciated.  Thanks.
  322.  
  323.  
  324. -- 
  325. David M. Marcovitz                     |  internet: marcovitz@uiuc.edu
  326. Computer-based Education Research Lab  |            dmmg1176@uxa.cso.uiuc.edu
  327. University of Illinois                 |  novanet:  marco / cca / nova
  328.  
  329.  
  330.  
  331. - -------------------------
  332.  
  333. From: dmmg1176@uxa.cso.uiuc.edu (David M Marcovitz)
  334. Subject:  Hierarchical Menus in Think C and TCL
  335. Date: 23 Jan 92 23:34:57 GMT
  336. Organization: University of Illinois at Urbana
  337.  
  338. dmmg1176@uxa.cso.uiuc.edu (David M Marcovitz) writes:
  339.  
  340. >I have been unable to get hierarchical menus to work with Think C
  341. >5.0.2 and TCL 1.1.2.  I have followed the instructions in the Think C
  342. >manual, and I have followed the example from the Art Class Project (it
  343. >has hierarchical Font and Size menus), but I still can't get it to
  344. >work.
  345.  
  346. As it turns out, my problem had nothing to do with hierarchical menus.
  347. It had to do with using GetSoundVol without including <Sound.h>.  I
  348. added the #include, and it works fine now.  If this was going to cause
  349. problems, shouldn't the compiler have warned me?
  350.  
  351. -- 
  352. David M. Marcovitz                     |  internet: marcovitz@uiuc.edu
  353. Computer-based Education Research Lab  |            dmmg1176@uxa.cso.uiuc.edu
  354. University of Illinois                 |  novanet:  marco / cca / nova
  355.  
  356.  
  357.  
  358. - -------------------------
  359.  
  360. From: CXT105@psuvm.psu.edu (Christopher Tate)
  361. Subject:  Hierarchical Menus in Think C and TCL
  362. Date: 24 Jan 92 00:10:55 GMT
  363. Organization: Penn State University
  364.  
  365. In article <1992Jan23.233457.18544@ux1.cso.uiuc.edu>, dmmg1176@uxa.cso.uiuc.edu
  366. (David M Marcovitz) says:
  367. >
  368. >As it turns out, my problem had nothing to do with hierarchical menus.
  369. >It had to do with using GetSoundVol without including <Sound.h>.  I
  370. >added the #include, and it works fine now.  If this was going to cause
  371. >problems, shouldn't the compiler have warned me?
  372.  
  373. This is what the "Require Prototypes" option is for.  Personally, I
  374. haven't written any code without it enabled for a long time; I find it's
  375. a great way to make yourself stay honest.  :-)
  376.  
  377. (I really don't know whether it works correctly with the TCL, though.
  378. It had better, otherwise I suspect someone's going to hear about it...)
  379.  
  380. - -----
  381. Christopher Tate                 |  Cryptogram #6:
  382. cxt105@psuvm.psu.edu             |
  383. CXT105@PSUVM.BITNET              |  DJ TZYOW, JF FJW OYJ
  384. - -------------------------------|  IWYN SFH TJWWQW.
  385. Send me the answer; I love mail! |
  386.  
  387.  
  388.  
  389. ---------------------------
  390.  
  391. From: dowdy@apple.com (Tom Dowdy)
  392. Subject: Beta test available - DarkSide 3.0
  393. Date: 23 Jan 92 16:19:52 GMT
  394. Organization: Apple Computer, Inc.
  395.  
  396. Well, it's almost ready!
  397.  
  398. After much anticipation and work (ugh!) DarkSide of the Mac 3.0 is
  399. almost ready for beta test (I have two more faders to finish).
  400.  
  401. Since I'll be finishing up sometime soon (like this weekend), now
  402. seems as good a time as any to request beta testers.  I'm looking
  403. for about 20 folks who are willing to TEST DarkSide 3.0 - and
  404. that doesn't mean you install it, run it once, and send me mail
  405. saying "It doesn't work."...
  406.  
  407. Testers MUST:
  408.  - run system 7 currently
  409.  - use their Mac often (daily, I guess - I use 5 Macs daily, but maybe
  410.    I'm a bit odd.)
  411.  - be willing to try to reproduce the bug and find out what makes it happen
  412.  - be able to give exact state of their system (versions, INITs, apps,  etc)
  413.  - have a mailer that can take large files (100K or more), have some sane
  414.    internet address that I can easily mail to.
  415.  - have run DarkSide before, or currently use it.
  416.  
  417. It would be great if you:
  418.  - Had MORE than one Mac
  419.  - Had a special kind of Mac (very low end (SE, Plus, Classic) or very
  420.    high end (4 24 bit boards) ) or run some new software (like A/UX 3.0)
  421.  - Had programming experience (to test writing new faders and give feedback
  422.    on the shell)
  423.  
  424. If you are interested, drop me a line saying why you are the greatest
  425. beta tester since computers were invented.  I'm usually VERY good about
  426. responding quickly to e-mail.  You should hear back quickly from me either:
  427.   a) sorry, but I don't think you would be helpful (Not bloody likely)
  428.   b) great, you're in
  429.   c) wait, I already have someone, but you might be a better person for
  430.      a certain test.
  431.  
  432. If you don't hear from me in a week, assume something is amiss and try
  433. again.  Once the list is full, I'll post a message saying that beta
  434. testing is underway.  I expect it to take between 2 and 4 weeks - as
  435. the code seems pretty stable right now with about a dozen folks here
  436. at Apple running it.  As soon as testing is complete, I'll be posting
  437. DarkSide 3.0 for all to use, and trumpeting its completion far and wide.
  438.  
  439. Then I shall sleep...
  440.  
  441.  Tom Dowdy                 Internet:  dowdy@apple.COM
  442.  Apple Computer MS:81KS    UUCP:      {sun,voder,amdahl,decwrl}!apple!dowdy
  443.  20525 Mariani Ave         AppleLink: DOWDY1
  444.  Cupertino, CA 95014       
  445.  "The 'Ooh-Ah' Bird is so called because it lays square eggs."
  446.  
  447.  
  448.  
  449. - -------------------------
  450.  
  451. From: dowdy@apple.com (Tom Dowdy)
  452. Subject: DarkSide Beta Testing Closed
  453. Date: 23 Jan 92 22:17:24 GMT
  454. Organization: Apple Computer, Inc.
  455.  
  456. Wow.
  457.  
  458. 30 minutes after asking for beta testers, my mailbox was flooded with
  459. requests.  I now have all of the beta tester I think I need.
  460.  
  461. Thank you all for the quick response.  
  462.  
  463. Sorry, but I have to turn away the remaining requests.
  464.  
  465.  Tom Dowdy                 Internet:  dowdy@apple.COM
  466.  Apple Computer MS:81KS    UUCP:      {sun,voder,amdahl,decwrl}!apple!dowdy
  467.  20525 Mariani Ave         AppleLink: DOWDY1
  468.  Cupertino, CA 95014       
  469.  "The 'Ooh-Ah' Bird is so called because it lays square eggs."
  470.  
  471.  
  472.  
  473. ---------------------------
  474.  
  475. From: P.S.Haight@mail.cornell.edu (Peter Haight)
  476. Subject: TCP/IP Library for Macintosh
  477. Date: 23 Jan 92 18:07:26 GMT
  478. Organization: Cornell University
  479.  
  480.  
  481. I'm looking for a TCP/IP library for the macintosh. I would prefer it in 
  482. Pascal or C, but will take one in any language. If you know where I can
  483. get such a thing, please write me at P.S.Haight@cornell.edu or post a reply
  484. here.
  485.  
  486. - --
  487. Peter Haight
  488. P.S.Haight@cornell.edu
  489.  
  490.  
  491.  
  492. - -------------------------
  493.  
  494. From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
  495. Subject:  TCP/IP Library for Macintosh
  496. Date: 23 Jan 92 21:16:24 GMT
  497. Organization: University of Illinois at Urbana
  498.  
  499. P.S.Haight@mail.cornell.edu (Peter Haight) writes:
  500.  
  501.  
  502. >I'm looking for a TCP/IP library for the macintosh. I would prefer it in 
  503. >Pascal or C, but will take one in any language. If you know where I can
  504. >get such a thing, please write me at P.S.Haight@cornell.edu or post a reply
  505. >here.
  506.  
  507. It's not a standalong TCP/IP library per se, but one version of NCSA Telnet
  508. does its own TCP (we wrote it before MacTCP came out). The source for
  509. it (telnet.ncsa) and the MacTCP one (telnet.mactcp) are available from
  510. ftp.ncsal.uiuc.edu. The major limitations to our package vs. MacTCP is that
  511. only one application at a time can be doing TCP, so you couldn't, for example,
  512. write a standalong FTP server using our package unless you never planned to 
  513. use Telnet which the server was running. You can have multiple connections,
  514. of course (telnet.ncsa provides an ftp server in the same program).
  515. -- 
  516. Mark Lanett                                                   mlanett@uiuc.edu
  517. Software Tools Group, NCSA, University of Illinois at Urbana-Champaign
  518.  
  519.  
  520.  
  521. ---------------------------
  522.  
  523. From: gilliam@witch.asel.udel.edu (Dan Gilliam)
  524. Subject: Calling SndDoCommand at interrupt time
  525. Date: 23 Jan 92 21:28:40 GMT
  526. Organization: AI duPont Inst.
  527.  
  528. Does anyone know if SndDoCommand() can be called at interrupt time?
  529. Inside Mac VI isn't very clear on the issue. In the Sound Manager chapter,
  530. page 34, several routines are listed as not callable at interrupt time.
  531. SndDoCommand is _not_ listed among these routines. At the top of the next
  532. page, it's explained that "you can safely call all other Sound Manager
  533. routines at interrupt time."
  534.  
  535. BUT, at the back of the book, Appendix B, SndDoCommand _is_ listed among
  536. the routines that may move or purge memory. Can I call it or not?
  537. I can't think of a good reason for SndDoCommand to move/purge memory,
  538. but maybe there is one.
  539.  
  540. Why I need to know:
  541. I'm trying to use SndDoCommand in a callback routine to ensure that my
  542. application can play sounds continuously even while menus are held down.
  543. (I do have fairly good reasons for wanting this behavior, weird as it is...)
  544. My callback routine causes the sound to glitch/skip, and I'm not sure if
  545. this is caused by interrupt problems with SndDoCommand or by something else.
  546. Everything plays fine if I queue up the sound commands in my event loop
  547. instead, though.
  548. If anyone can suggest another way to do this, I'd appreciate it muchly!
  549.  
  550. Thanks in advance,
  551.  
  552. Dan Gilliam    (CS grad student at Univ. of Del.)
  553. <gilliam@asel.udel.edu>
  554.  
  555.  
  556.  
  557. - -------------------------
  558.  
  559. From: REEKES@applelink.apple.com (Jim Reekes)
  560. Subject:  Calling SndDoCommand at interrupt time
  561. Date: 30 Jan 92 00:27:51 GMT
  562. Organization: Apple Computer, Inc.
  563.  
  564. In article <73258@nigel.ee.udel.edu>, gilliam@witch.asel.udel.edu (Dan Gilliam) writes:
  565. > Does anyone know if SndDoCommand() can be called at interrupt time?
  566. > Inside Mac VI isn't very clear on the issue. In the Sound Manager chapter,
  567. > page 34, several routines are listed as not callable at interrupt time.
  568. > SndDoCommand is _not_ listed among these routines. At the top of the next
  569. > page, it's explained that "you can safely call all other Sound Manager
  570. > routines at interrupt time."
  571. > BUT, at the back of the book, Appendix B, SndDoCommand _is_ listed among
  572. > the routines that may move or purge memory. Can I call it or not?
  573. > I can't think of a good reason for SndDoCommand to move/purge memory,
  574. > but maybe there is one.
  575. > Why I need to know:
  576. > I'm trying to use SndDoCommand in a callback routine to ensure that my
  577. > application can play sounds continuously even while menus are held down.
  578. > (I do have fairly good reasons for wanting this behavior, weird as it is...)
  579. > My callback routine causes the sound to glitch/skip, and I'm not sure if
  580. > this is caused by interrupt problems with SndDoCommand or by something else.
  581. > Everything plays fine if I queue up the sound commands in my event loop
  582. > instead, though.
  583.  
  584. SndDoCommand may move or purge memory because you can send some commands
  585. that will cause memory allocation. That's why it's listed in Appendix B.
  586.  
  587. You can issue another bufferCmd within your callBackProc.  That's exactly
  588. what QuickTime does.
  589.  
  590.  
  591. - -----------------------------------------------------------------
  592. Jim Reekes, E.O.             |     Macintosh Toolbox Engineering
  593.                              |          Sound Manager Expert
  594. Apple Computer, Inc.         | All opinions expressed are mine, and
  595. 20525 Mariani Ave. MS: 81-EQ |  do not necessarily represent those
  596. Cupertino, CA 95014          |  of my employer, Apple Computer Inc.
  597.  
  598.  
  599.  
  600. - -------------------------
  601.  
  602. From: Dwayne@kcbbs.gen.nz (Dwayne Knowles)
  603. Subject:  Calling SndDoCommand at interrupt ti
  604. Date: 31 Jan 92 22:31:50 GMT
  605. Organization: Kappa Crucis Unix BBS, Auckland, New Zealand
  606.  
  607. > You can issue another bufferCmd within your callBackProc. That's
  608. > exactly what QuickTime does.
  609.  
  610. could you please post a list of commands that can be used with sndDoCommand 
  611. at interrupt time please?
  612.  
  613. thanks.
  614.  
  615.  
  616.  
  617. ---------------------------
  618.  
  619. From: tiktin@dogmatix.cs.uoregon.edu (David Mark Tiktin)
  620. Subject: Making Folders
  621. Organization: University of Oregon
  622. Date: Fri, 24 Jan 1992 00:17:00 GMT
  623.  
  624.  
  625. I find lots of information on doing things to files, but nothing about
  626. doing things to folders.  Can I create folders and delete them from within
  627. a THINK C application?  (I'm particularly interested in doing this in the
  628. context of an AppleShare file server.)
  629.  
  630. Thanks,
  631.  
  632. David Tiktin
  633. tiktin@cs.uoregon.edu
  634.  
  635.  
  636.  
  637. - -------------------------
  638.  
  639. From: leonardr@ccs.itd.umich.edu
  640. Subject:  Making Folders
  641. Date: 24 Jan 92 20:29:30 GMT
  642. Organization: Campus Computing Sites, University of Michigan-Ann Arbor
  643.  
  644. In article <TIKTIN.92Jan23161700@dogmatix.cs.uoregon.edu> 
  645. tiktin@dogmatix.cs.uoregon.edu (David Mark Tiktin) writes:
  646. >
  647. >I find lots of information on doing things to files, but nothing about
  648. >doing things to folders.  Can I create folders and delete them from within
  649. >a THINK C application?  (I'm particularly interested in doing this in the
  650. >context of an AppleShare file server.)
  651. >
  652.         Check out Inside Macintosh Volume IV page 146, the DirCreate routine
  653. will allow you to create a folder.  If you want a higher level routine, there
  654. is an HDirCreate which takes a vRefNum, dirID, fName triplet which works
  655. quite nicely and if you are using System 7 only, then see FSpDirCreate.  These
  656. will work on ANY Mac mountable volume.(
  657.         As to deleting a folder, deleting the folder itself is easy, but the
  658. trick is that befre you can delete the folder you MUST delete all of it's
  659. contents first - that entails a directory/tree walk with deletions of each
  660. file/folder encountered.  Not difficult, just tedious.
  661. ~
  662.         If you are doing stuff with AppleShare, you should look into the
  663. calls related to folder permissions to make sure you don't try to delete
  664. folders/files that you don't have permission to - or when you create a folder
  665. that you give it the correct permissions (there is a default).
  666.  
  667. -- 
  668. - ---------------------------------------------------------------------
  669. Leonard Rosenthol          Internet: leonardr@ccs.itd.umich.edu
  670. Director of Advanced Technology   AppleLink: MACgician
  671. Aladdin Systems, inc.          GEnie:     MACgician
  672.  
  673.  
  674.  
  675. ---------------------------
  676.  
  677. From: jkeegan@cs.ulowell.edu (Jeff Keegan)
  678. Subject: Putting the drive to sleep on a powerbook
  679. Date: 23 Jan 92 23:17:14 GMT
  680. Organization: University of Lowell Computer Science, Lowell MA
  681.  
  682. Hi.. I was wondering if there is a way to tell the system (from C) to put the
  683. drive into sleep mode while still keeping the machine alive.. Clicking on the
  684. sleep button on the battery DA and then waking it up with a key produces a loud click (on the Powerbook 140), and that can be very disturbing in a
  685. noise-sensitive situation. Any ideas? I've been going by the Power Manager
  686. section of Inside Macintosh VI, is there a more up to date source of info?
  687.  
  688. ..Jeff Keegan
  689.  
  690.  /=======================================> Cow Poetry <=====================\
  691.  |Jeff Keegan            |         The distant hills call to me.            |
  692.  |jkeegan@cs.ulowell.edu |       Their rolling waves seduce my heart.       |
  693.  |-----------------------|  Oh, how I want to graze in their lush valleys.  |
  694.  |___  |  |  |  ___|  |  |  Oh, how I want to run down their green slopes.  |
  695.  |     |  |  |     |     |               Alas, I cannot.                    |
  696.  |   \ |  |  |___  |     |           Damn the electric fence!               |
  697.  |    \|     |     |  |  |           Damn the electric fence!               |
  698.  \==========================================================================/
  699.  
  700.  
  701.  
  702. - -------------------------
  703.  
  704. From: stevec@Apple.COM (Steve Christensen)
  705. Subject:  Putting the drive to sleep on a powerbook
  706. Date: 25 Jan 92 02:47:28 GMT
  707. Organization: Apple Computer Inc., Cupertino, CA
  708.  
  709. jkeegan@cs.ulowell.edu (Jeff Keegan) writes:
  710.  
  711. >Hi.. I was wondering if there is a way to tell the system (from C) to put the
  712. >drive into sleep mode while still keeping the machine alive.. Clicking on the
  713. >sleep button on the battery DA and then waking it up with a key produces a loud click (on the Powerbook 140), and that can be very disturbing in a
  714. >noise-sensitive situation. Any ideas? I've been going by the Power Manager
  715. >section of Inside Macintosh VI, is there a more up to date source of info?
  716.  
  717. There is no programming interface to do this, and it requires a bit of work
  718. to make sure that everything is consistent...
  719.  
  720. steve
  721.  
  722. -- 
  723. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  724.   Steve Christensen            Never hit a man with glasses.
  725.   stevec@apple.com            Hit him with a baseball bat.
  726.  
  727.  
  728.  
  729. ---------------------------
  730.  
  731. From: tequila@ccwf.cc.utexas.edu (Mario Garcia)
  732. Subject: CWindowPtr or WindowPtr ?
  733. Date: 24 Jan 92 02:29:25 GMT
  734. Organization: The University of Texas at Austin, Austin TX
  735.  
  736. Hello Mac Programmers,
  737.  
  738. I know this might be very simple, but I'm new to Mac programming, so please
  739. excuse my ignorance. I'm using Think C 5.0.2 and I'm  having the following      
  740. problem while trying to load a WIND resource:
  741.  
  742. This code produces a compilation error "pointer types do not match"
  743.  
  744.     CWindowPtr  aWindow;
  745.  
  746.     aWindow = GetNewCWindow(128, 0L, (CWindowPtr)-1L);
  747.  
  748. however, the following works OK
  749.  
  750.     aWindow = (CWindowPtr)GetNewCWindow(128, 0L, (CWindowPtr)-1L);
  751.  
  752. what I don't understand is why I need to use typecasting since GetNewCWindow
  753. is supposed to return a CWindowPtr. What is the correct procedure?
  754.  
  755. many thanks in advance.
  756.  
  757. - -----------------------------------------------------------------------------
  758. Mario L. Garcia                                     1212 Guadalupe Apt. 802
  759. Mathematics Student                                 Austin, TX 78701
  760. The University of Texas at Austin                   (512)479-8621
  761. e-mail tequila@ccwf.cc.utexas.edu
  762. - -----------------------------------------------------------------------------
  763.  
  764.  
  765.  
  766. - -------------------------
  767.  
  768. From: tagreen@bronze.ucs.indiana.edu (Todd Green)
  769. Subject:  CWindowPtr or WindowPtr ?
  770. Date: 24 Jan 92 14:49:28 GMT
  771. Organization: Indiana University
  772.  
  773. In article <65530@ut-emx.uucp> tequila@ccwf.cc.utexas.edu (Mario Garcia) writes
  774. >
  775. >    CWindowPtr  aWindow;
  776. >
  777. >    aWindow = GetNewCWindow(128, 0L, (CWindowPtr)-1L);
  778. >what I don't understand is why I need to use typecasting since GetNewCWindow
  779. >is supposed to return a CWindowPtr. What is the correct procedure?
  780.  
  781. Look at Windows.h and you'll see that it is NOT supposed to return a
  782. CWindowPtr:
  783.  
  784. pascal WindowPtr GetNewCWindow(short windowID,void *wStorage,
  785.                                WindowPtr behind) = 0xAA46; 
  786.  
  787. It returns a WindowPtr which is what you should declare your window
  788. structure as.  I think there is a technote or at least it's mentioned
  789. somewhere that you should declare a "color" window as a WindowPtr,
  790. (unfortunately) don't always trust IM.
  791.  
  792. Hope that helps,
  793. -- 
  794. Internet: tagreen@bronze.ucs.indiana.edu
  795. NeXTMail: tagreen@cheyenne.ucs.indiana.edu
  796. BitNet:   tagreen@iubacs.bitnet
  797.  
  798.  
  799.  
  800. - -------------------------
  801.  
  802. From: timm@void.ncsa.uiuc.edu (Coffee Junkie)
  803. Subject:  CWindowPtr or WindowPtr ?
  804. Date: 24 Jan 92 16:31:26 GMT
  805. Organization: University of Illinois at Urbana
  806.  
  807. tagreen@bronze.ucs.indiana.edu (Todd Green) writes:
  808.  
  809. >In article <65530@ut-emx.uucp> tequila@ccwf.cc.utexas.edu (Mario Garcia) writes
  810. >>
  811. >>    CWindowPtr  aWindow;
  812. >>
  813. >>    aWindow = GetNewCWindow(128, 0L, (CWindowPtr)-1L);
  814. >>what I don't understand is why I need to use typecasting since GetNewCWindow
  815. >>is supposed to return a CWindowPtr. What is the correct procedure?
  816.  
  817. >Look at Windows.h and you'll see that it is NOT supposed to return a
  818. >CWindowPtr:
  819.  
  820. >pascal WindowPtr GetNewCWindow(short windowID,void *wStorage,
  821. >                               WindowPtr behind) = 0xAA46; 
  822.  
  823. >It returns a WindowPtr which is what you should declare your window
  824. >structure as.  I think there is a technote or at least it's mentioned
  825. >somewhere that you should declare a "color" window as a WindowPtr,
  826. >(unfortunately) don't always trust IM.
  827.  
  828. Well, you may not want to do this to avoid having to coerce 'port' to 
  829. the correct type all the time.  If you really want to avoid the coercion 
  830. problem, define a duplicate set of headers in "Windows.h" with CWindowPtr 
  831. in place of WindowPtr all pointing to the same respective traps.  This will 
  832. work because Inside Mac V claims that "all routines which accept a WindowPtr 
  833. will now accept a CWindowPtr".
  834.  
  835. -- 
  836. Tim McClarren (timm@ncsa.uiuc.edu)|"I'm countin' down to the day deservin'
  837. Mac Programmer  (217)244-0015     | Fittin' for a king  I'm waitin' for the
  838. NCSA/STG@University of Illinois   | time when I can Get to Arizona" PE Apoc 91
  839.  
  840.  
  841.  
  842. - -------------------------
  843.  
  844. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  845. Subject:  CWindowPtr or WindowPtr ?
  846. Date: 24 Jan 92 16:09:33 GMT
  847. Organization: Kalamazoo College
  848.  
  849. tequila@ccwf.cc.utexas.edu (Mario Garcia) writes:
  850.  
  851. >Hello Mac Programmers,
  852.  
  853. Hi!
  854.  
  855. >This code produces a compilation error "pointer types do not match"
  856. >    CWindowPtr  aWindow;
  857. >    aWindow = GetNewCWindow(128, 0L, (CWindowPtr)-1L);
  858. >however, the following works OK
  859. >    aWindow = (CWindowPtr)GetNewCWindow(128, 0L, (CWindowPtr)-1L);
  860. >what I don't understand is why I need to use typecasting since GetNewCWindow
  861. >is supposed to return a CWindowPtr.
  862.  
  863. Not according to my header files, and probably yours too.  GetNewCWindow
  864. returns a WindowPtr.  Since "Inside Macintosh is the Old Testament, and
  865. the MPW headers are the New," you might want to pencil in the change in
  866. your copy of IM5.
  867.  
  868. It's pretty immaterial, since WindowPtr and CWindowPtr are pretty much
  869. interchangeable.
  870. -- 
  871.  Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
  872.  
  873.  
  874.  
  875. - -------------------------
  876.  
  877. From: ksand@apple.com (Kent Sandvik)
  878. Subject:  CWindowPtr or WindowPtr ?
  879. Date: 28 Jan 92 09:07:24 GMT
  880. Organization: MacDTS Mongols
  881.  
  882. In article <1992Jan24.160933.26526@hobbes.kzoo.edu>, k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
  883. > tequila@ccwf.cc.utexas.edu (Mario Garcia) writes:
  884. > >Hello Mac Programmers,
  885. > Hi!
  886. > >This code produces a compilation error "pointer types do not match"
  887. > >    CWindowPtr  aWindow;
  888. > >    aWindow = GetNewCWindow(128, 0L, (CWindowPtr)-1L);
  889. > >however, the following works OK
  890. > >    aWindow = (CWindowPtr)GetNewCWindow(128, 0L, (CWindowPtr)-1L);
  891. > >what I don't understand is why I need to use typecasting since GetNewCWindow
  892. > >is supposed to return a CWindowPtr.
  893. > Not according to my header files, and probably yours too.  GetNewCWindow
  894. > returns a WindowPtr.  Since "Inside Macintosh is the Old Testament, and
  895. > the MPW headers are the New," you might want to pencil in the change in
  896. > your copy of IM5.
  897. > It's pretty immaterial, since WindowPtr and CWindowPtr are pretty much
  898. > interchangeable.
  899.  
  900. Yes, 411 information:
  901. pascal WindowPtr GetNewCWindow(short windowID,void *wStorage,WindowPtr behind)
  902.     = 0xAA46; 
  903. File {CIncludes}Windows.h
  904.  
  905. And codewise:
  906.  
  907.     if(myEnvironment.CheckFunction(TEnvironment::kColorQD))            // get color window by default    
  908.         fDocWindow = GetNewCWindow(resID, NULL, (WindowPtr) -1);
  909.     else
  910.         fDocWindow = GetNewWindow(resID,NULL,(WindowPtr) -1);    // otherwise a B/W window
  911.  
  912. where fDocWindow is a WindowPtr. They are interchangeable, so I it makes
  913. sense to aim for a color window if the system has color QD.
  914.  
  915. Kent Sandvik/Slacker from DTS who really should drive home by now...
  916.  
  917.  
  918.  
  919. ---------------------------
  920.  
  921. From: Mike_Diack@kcbbs.gen.nz (Mike Diack)
  922. Subject: Trashing menu bar
  923. Date: 25 Jan 92 06:04:12 GMT
  924. Organization: Kappa Crucis Unix BBS, Auckland, New Zealand
  925.  
  926. Subject line says it all - please , those who are going to tell me not 
  927. to do it - dont - i'm writing a "slide show" type app in Lightspeed 
  928. pascal , and the menu bar looks bad on a big projection sdreen. Any 
  929. hints on how to get rid of the pesky thing would really be appreciated.
  930. thanks , Mike.
  931.  
  932.  
  933.  
  934. - -------------------------
  935.  
  936. From: ericd@CATICSUF.CSUFRESNO.EDU (Eric W. Douglas)
  937. Subject:  Trashing menu bar
  938. Date: 24 Jan 92 19:42:31 GMT
  939.  
  940.  
  941. Mike_Diack@kcbbs.gen.nz (Mike Diack) writes:
  942.  
  943. >Subject line says it all - please , those who are going to tell me not 
  944. >to do it - dont - i'm writing a "slide show" type app in Lightspeed 
  945. >pascal , and the menu bar looks bad on a big projection sdreen. Any 
  946. >hints on how to get rid of the pesky thing would really be appreciated.
  947. >thanks , Mike.
  948.  
  949. I believe that there is a low-mem global called "MBarHeight", you'd 
  950. probably have to set this to 0, then redraw the menu bar... I'm not
  951. sure, but I have done this before... expirement with it, if it doesn't
  952. work, then send me some email tonight, and I'll look up my old code.
  953.  
  954. --eric
  955.  
  956. * | Eric W. Douglas             Technojock               +1 209 897 5785 | *
  957. * | I'net: ericd@caticsuf.csufresno.edu      ericd@csufres.csufresno.edu | *
  958. * | AppleLink: STUDIO.D      Compuserve: 76170,1472       AOL: EWDOUGLAS | *
  959. ____________________________________________________________________________
  960.  
  961.  
  962.  
  963. - -------------------------
  964.  
  965. From: Mike_Diack@kcbbs.gen.nz (Mike Diack)
  966. Subject: Menu Bar Gone !
  967. Date: 26 Jan 92 12:21:41 GMT
  968. Organization: Kappa Crucis Unix BBS, Auckland, New Zealand
  969.  
  970. Thanks to all of you who replied both via EMAIL and posting to my request 
  971. for info on zapping the menu bar - it is now been duly exterminated 
  972. and my little slide show looks so much better:-):-):-)
  973. Cheers , Mike
  974.  
  975.  
  976.  
  977. - -------------------------
  978.  
  979. From: Romain.Vignes@fifi.univ-lyon1.fr
  980. Subject:  Trashing menu bar
  981. Date: 27 Jan 92 11:56:24 GMT
  982.  
  983. Mike_Diack@kcbbs.gen.nz (Mike Diack) writes:
  984.  
  985. >Subject line says it all - please , those who are going to tell me not 
  986. >to do it - dont - i'm writing a "slide show" type app in Lightspeed 
  987. >pascal , and the menu bar looks bad on a big projection sdreen. Any 
  988. >hints on how to get rid of the pesky thing would really be appreciated.
  989. >thanks , Mike.
  990.  
  991. There is a lot of hints, but this one is very simple:
  992.  
  993.     - Save the menu bar height (MBarHeight global)
  994.  
  995.     - set this height to zero
  996.  
  997.     - set the correct window position...
  998.  
  999. You can now draw what you want on the entire screen.
  1000.  
  1001. BUT: Don't forget to restore the old value at the end of the slide-show...
  1002.  
  1003.                 Bye,
  1004.  
  1005.                     Romain Vignes
  1006.                     roms@fifi.univ-lyon1.fr
  1007.  
  1008.  
  1009.  
  1010. ---------------------------
  1011.  
  1012. From: ptrubey@netcom.COM (Phil Trubey)
  1013. Subject: Command Mac database format?
  1014. Date: 24 Jan 92 06:31:00 GMT
  1015. Organization: Netcom - Online Communication Services  (408 241-9760 guest)
  1016.  
  1017. With all the nice program to program integration technologies available
  1018. for the Mac (PPC, Apple Events, Publish and Subscribe, etc), has anyone
  1019. thought of a strategy to integrate - even at a simple level - simple
  1020. database information for multiple programs?  
  1021.  
  1022. For example, wouldn't it be nice if XYZ's calendar program, and PRQ's
  1023. address book program, and MNO's label printing program could all
  1024. use the same repository to access and modify their data?  Sure, different
  1025. programs would have different fields, but some fields are common and the
  1026. objects they refer to are common.  
  1027.  
  1028. Just a thought...
  1029.  
  1030. -- 
  1031. Phil Trubey                   | ptrubey@netcom.com
  1032. Systemhouse Inc.              | 415-243-8100 (day)
  1033.  
  1034.  
  1035.  
  1036. - -------------------------
  1037.  
  1038. From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
  1039. Subject:  Command Mac database format?
  1040. Date: 24 Jan 92 19:56:03 GMT
  1041. Organization: Royal Institute of Technology, Stockholm, Sweden
  1042.  
  1043. .COM> ptrubey@netcom.COM (Phil Trubey) writes:
  1044.  
  1045.    For example, wouldn't it be nice if XYZ's calendar program, and PRQ's
  1046.    address book program, and MNO's label printing program could all
  1047.    use the same repository to access and modify their data?  Sure, different
  1048.  
  1049. The Apple Event Registry has a core suite and a few extended suites of
  1050. AppleEvents that can be used for exchanging data transparently. This,
  1051. and the Object Support Library (which lets you parse things like
  1052. "select the third record containing no wovel" sort of easily) will
  1053. probably present an understandable and comprehensive data exchange
  1054. mechanism.
  1055.  
  1056. Not to mention XTND.
  1057.  
  1058. --
  1059. This Signature is distributed under the conditions of the Signature License,
  1060. available at a fee from   h+@nada.kth.se  (Jon W{tte)  Reading the Signature
  1061. implies that you accept to be bound by the terms in said License. Should you
  1062. not agree on any of these terms, you must return the Signature unread to me.
  1063.  
  1064.  
  1065.  
  1066. ---------------------------
  1067.  
  1068. From: plg@mlutv.link.diab.se (Patric Ljung)
  1069. Subject: Sockets lib wanted for MacTCP
  1070. Date: 23 Jan 92 16:52:07 GMT
  1071. Organization: Diab Data AB
  1072.  
  1073. - -----------------------------------------------------
  1074.  
  1075. As far as I know there are three sockets lib available. Two of these are PDs and one is from Novell.
  1076.  
  1077.     - TCPort from Novell
  1078.     - PD from FTP Site madhaus.utcs.utoronte.ca
  1079.     - PD from FTP Site net-dist.mit.edu
  1080.  
  1081. The one I have looked at is the one from net-dist.mit.edu. This lib was hardly complete. It did know handle select for TCP-sockets, since driver up-calls not was used for TCP-sockets. When I changed the code so up-calls would be used I managed to have the Mac bombing me when I closed the connection. The up-call I received upon close contained garbage. Then I just ignored the 'last' up-call.
  1082. Neither the Mac nor I was happy about that. Various Bus errors and invalid instructions was the result of that simple action.
  1083.  
  1084.  
  1085. So, is there anyone who has solved this problem, or knows if there are any other sockets library that handles polling select-calls, i.e. asynchronus up-calls with tcp-streams.
  1086.  
  1087. I've been trying to get some information from a Novell retailer about TCPort from Novell without success. Someone told me that Novell dropped this product. Is this product in that case available anywhere else?
  1088.  
  1089.  
  1090. Please send me any information on sockets library for MacTCP. Please also send a mail to plg@diab.se since I'm not reading news to often.
  1091.  
  1092. mvh / Patric
  1093.  
  1094.  
  1095.  
  1096. - -------------------------
  1097.  
  1098. From: mcmath@csb1.nlm.nih.gov (Chuck McMath)
  1099. Subject:  Sockets lib wanted for MacTCP
  1100. Date: 24 Jan 92 16:43:41 GMT
  1101. Organization: MSD
  1102.  
  1103. There is information on using MacTCP in the Spring 1991 issue of
  1104. d e v e l o p magazine (it's on the developer CD-ROMs).  I believe it is Issue
  1105. 6.  The article presents a lot of good info, and has complete source code
  1106. to two TCP/IP applications - one simple and one quite complex.  The
  1107. TCP code could be used as the basis for a library.  I am using it in an
  1108. app I am writing, and the code DOES work! :)
  1109.  
  1110. If you need more info on d e v e l o p then try this:
  1111.  
  1112. phone orders: 1-800-545-9364
  1113.  
  1114. cost is $30 for 4 issues; includes a CD-ROM with each issue.  Each CD-ROM
  1115. contains code and articles for ALL previous issues, plus other developer
  1116. junk.
  1117.  
  1118. -- chuck mcmath
  1119.  
  1120.  
  1121.  
  1122. - -------------------------
  1123.  
  1124. From: time@ice.com (Tim Endres)
  1125. Subject:  Sockets lib wanted for MacTCP
  1126. Date: 25 Jan 92 16:18:52 GMT
  1127. Organization: ICE Engineering, Inc.
  1128.  
  1129.  
  1130. In article <1992Jan24.164341.3882@nlm.nih.gov> (comp.sys.mac.comm,comp.sys.mac.programmer,comp.sys.mac.wanted`), mcmath@csb1.nlm.nih.gov (Chuck McMath) writes:
  1131. > There is information on using MacTCP in the Spring 1991 issue of
  1132. > d e v e l o p magazine (it's on the developer CD-ROMs).  I believe it is Issue
  1133. > 6.  The article presents a lot of good info, and has complete source code
  1134. > to two TCP/IP applications - one simple and one quite complex.  The
  1135. > TCP code could be used as the basis for a library.  I am using it io
  1136.  
  1137. What in the world does this have to do with a socket library?
  1138.  
  1139.  
  1140. Tim Endres -> time@ice.com -or- uupsi!tbomb!time
  1141. ICE Engineering, 8840 Main Street, Whitmore Lake MI. 48189
  1142. Voice (313) 449 8288 FAX (313) 449 9208
  1143. - ------ USENET: A slow moving self parody..... ph
  1144.  
  1145.  
  1146.  
  1147. - -------------------------
  1148.  
  1149. From: jxyh@lanl.gov (John H. Hall)
  1150. Subject:  Sockets lib wanted for MacTCP
  1151. Date: 28 Jan 92 01:29:33 GMT
  1152. Organization: Los Alamos National Laboratory
  1153.  
  1154. In article <1203@diab.se>, plg@mlutv.link.diab.se (Patric Ljung) writes:
  1155. > -------------------------------------------------------
  1156. > As far as I know there are three sockets lib available. Two of these are PDs and one is from Novell.
  1157. >     - TCPort from Novell
  1158. >     - PD from FTP Site madhaus.utcs.utoronte.ca
  1159. >     - PD from FTP Site net-dist.mit.edu
  1160. > The one I have looked at is the one from net-dist.mit.edu. This lib was hardly complete. It did know handle select for TCP-sockets, since driver up-calls not was used for TCP-sockets. When I changed the code so up-calls would be used I managed to have the Mac bombing me when I closed the connection. The up-call I received upon close contained garbage. Then I just ignored the 'last' up-call.
  1161. > Neither the Mac nor I was happy about that. Various Bus errors and invalid instructions was the result of that simple action.
  1162. > So, is there anyone who has solved this problem, or knows if there are any other sockets library that handles polling select-calls, i.e. asynchronus up-calls with tcp-streams.
  1163. > I've been trying to get some information from a Novell retailer about TCPort from Novell without success. Someone told me that Novell dropped this product. Is this product in that case available anywhere else?
  1164. > Please send me any information on sockets library for MacTCP. Please also send a mail to plg@diab.se since I'm not reading news to often.
  1165. > mvh / Patric
  1166.  
  1167. The TCPort package from Novell does handle your requirements regarding select, etc.
  1168. It works with TCport or MacTCP. Future releases of the socket library will only 
  1169. support MacTCP. The current release is Novell's TCPort Developer's Kit, version 2.2 which
  1170. is System 7.0 compatible. The purchase price of the developer's kit is separate from
  1171. the licensing fee.
  1172.  
  1173. For my purposes, porting some local tools from unix, the socket library has been
  1174. enormously useful.  
  1175.  
  1176. John Hall
  1177.  
  1178.  
  1179.  
  1180. ---------------------------
  1181.  
  1182. From: mbp@generali.harvard.edu (Mark B Palmerino)
  1183. Subject: Quickdraw - PICT question
  1184. Date: 24 Jan 92 16:56:48 GMT
  1185. Organization: Harvard University, Cambridge, MA
  1186.  
  1187. I've got a question about quickdraw, pict files and printing on a
  1188. printer.
  1189.  
  1190. What I want to do is draw two circles that are filled with two different
  1191. patterns. I can do that. When the circles overlap, I want the two
  1192. different patterns to be seen. I can do that by:
  1193.  
  1194. PenMode(patOr);
  1195.  
  1196. (Oh, BTW, I'm programming under MPW using C++)
  1197.  
  1198. Actually, I do all my drawing into a Picture (using OpenPicture and
  1199. ClosePicture) and then use DrawPicture to write it to a window.
  1200.  
  1201. All of this works fine and my fill patterns overlap like I want. However,
  1202. when I print the picture, the fills do not overlap (the fill in the last
  1203. drawn circle is there but this blocks out the part of the other circle
  1204. underneath). Also, if I save the Picture to a PICT file and import it
  1205. into another application (e.g., Persuasion) and then print it out I also
  1206. do NOT get the proper overlaying effect that I want.
  1207.  
  1208. Is there a trick that I'm missing? Any pointers would be greatly
  1209. appreciated.
  1210.  
  1211. Much thanks in advance.
  1212.  
  1213.  
  1214. -- 
  1215. Mark Palmerino      mbp@wjh12.harvard.edu       Voice: (617) 345-9500
  1216.  
  1217.  
  1218.  
  1219. - -------------------------
  1220.  
  1221. From: jcav@quads.uchicago.edu (JohnC)
  1222. Subject:  Quickdraw - PICT question
  1223. Date: 24 Jan 92 18:05:51 GMT
  1224. Organization: The Royal Society for Putting Things on Top of Other Things
  1225.  
  1226. In article <1992Jan24.165648.8925@burrhus.harvard.edu> mbp@generali.harvard.edu (Mark B Palmerino) writes:
  1227. >I've got a question about quickdraw, pict files and printing on a
  1228. >printer.
  1229. >
  1230. >What I want to do is draw two circles that are filled with two different
  1231. >patterns. I can do that. When the circles overlap, I want the two
  1232. >different patterns to be seen. I can do that by:
  1233. >
  1234. >PenMode(patOr);
  1235. >
  1236. >All of this works fine and my fill patterns overlap like I want. However,
  1237. >when I print the picture, the fills do not overlap (the fill in the last
  1238. >drawn circle is there but this blocks out the part of the other circle
  1239. >underneath). Also, if I save the Picture to a PICT file and import it
  1240. >into another application (e.g., Persuasion) and then print it out I also
  1241. >do NOT get the proper overlaying effect that I want.
  1242.  
  1243. patOr mode doesn't work on Postscript printers.  This stems from part of the
  1244. definition of the Postscript imaging model, which states that all marks drawn
  1245. on the page completely replace anything that was already there.  The only
  1246. way around this would be to draw your two circles into a bitmap, where the
  1247. effect would appear correctly, then use _CopyBits to get the image onto the
  1248. printed page.  Of course, if you're not using a Postscript printer than
  1249. something else is going on.
  1250.  
  1251. -- 
  1252. John Cavallino                  |  EMail: jcav@midway.uchicago.edu
  1253. University of Chicago Hospitals |         John_Cavallino@uchfm.bsd.uchicago.edu
  1254. Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
  1255. B0 f++ c+ g+ k s+(+) e+ h- pv   |         Chicago, IL  60637
  1256.  
  1257.  
  1258.  
  1259. ---------------------------
  1260.  
  1261. From: shall@yoda.eecs.wsu.edu (Sean Hall - CS460)
  1262. Subject: Auto Pop (why?)
  1263. Organization: Washington State University
  1264. Date: Fri, 24 Jan 92 18:02:15 GMT
  1265.  
  1266. I was just wondering, why would a compiler use the Auto Pop bit in the 
  1267. trap words?  I see WHAT it is doing, I just can't seem to see any benefit
  1268. of doing it.
  1269.  
  1270. Sean Hall
  1271.  
  1272.  
  1273.  
  1274. - -------------------------
  1275.  
  1276. From: tecot@momenta.com (Ed Tecot)
  1277. Subject:  Auto Pop (why?)
  1278. Date: 28 Jan 92 00:13:25 GMT
  1279. Organization: Momenta Corporation
  1280.  
  1281. shall@yoda.eecs.wsu.edu (Sean Hall - CS460) writes:
  1282. >I was just wondering, why would a compiler use the Auto Pop bit in the 
  1283. >trap words?  I see WHAT it is doing, I just can't seem to see any benefit
  1284. >of doing it.
  1285.  
  1286. It wouldn't.  The auto pop bit was used before there were compilers that
  1287. could generate trap words directly.  Since the only other alternative was
  1288. a collection of library routines, the auto pop bit was used to reduce the
  1289. code size of each routine by 2 bytes and speed up the procedure call a
  1290. tiny bit.
  1291.  
  1292.                         _emt
  1293.  
  1294.  
  1295.  
  1296. ---------------------------
  1297.  
  1298. From: jkroll@orac.Corp.Sun.COM (Jeff Kroll)
  1299. Subject: MS Mail XCMDs or Externals?
  1300. Date: 24 Jan 92 18:55:18 GMT
  1301. Organization: Sun Microsystems Inc., Mountain View, CA
  1302.  
  1303. Looking for MS Mail HyperCard XCMDs or 4D Externals...
  1304.  
  1305. Seems to me I saw an unfinished suite of XCMDs for MS Mail about a year ago and a friend of mine is now looking for them (or the finished suite)... any and all help is much appreciated.
  1306.  
  1307. Thanks,
  1308. Jeff
  1309.  
  1310.  
  1311.  
  1312. - -------------------------
  1313.  
  1314. From: stinky@halcyon.com (tom benedict)
  1315. Subject:  MS Mail XCMDs or Externals?
  1316. Date: 24 Jan 92 23:25:43 GMT
  1317. Organization: The 23:00 News and Mail Service
  1318.  
  1319. jkroll@orac.Corp.Sun.COM (Jeff Kroll) writes:
  1320.  
  1321. > Looking for MS Mail HyperCard XCMDs or 4D Externals...
  1322. > Seems to me I saw an unfinished suite of XCMDs for MS Mail about a year ago a
  1323. > Thanks,
  1324. > Jeff
  1325.  
  1326. Microsoft has XCMDs for MSMail. Call their customer service for the kit. 
  1327. I think it's reasonably priced.
  1328. BTW, the MSMail forms builder is a HyperCard stack!
  1329.  
  1330. Tom Benedict
  1331. HyperCard Developer
  1332. stinky@halcyon.com
  1333. /es
  1334.  
  1335.  
  1336. --
  1337.   The 23:00 News and Mail Service - +1 206 292 9048 - Seattle, WA USA
  1338.                           PEP, V.32, V.42bis
  1339.                   +++ A Waffle Iron, Model 1.64 +++
  1340.  
  1341.  
  1342.  
  1343. ---------------------------
  1344.  
  1345. From: trn@warper.jhuapl.edu (Tony Nardo)
  1346. Subject: ERead() completion woes
  1347. Date: 24 Jan 92 18:02:59 GMT
  1348.  
  1349. After puzzling over this one for a while, I figured I'd see if anyone else
  1350. had run into a similar condition...
  1351.  
  1352. Background:
  1353.     MAC IIci running System 7.0
  1354.     MPW 3.2, C source
  1355.     Shiva EtherPort II card
  1356.     .ENET driver
  1357.     sources are being compiled as a Tool
  1358.  
  1359. I am currently attempting to read broadcast packets off the Ethernet using
  1360. the .ENET driver and support routines for same.  I'm observing three classes
  1361. of conditions: two expected, one unexpected.
  1362.     - If I use the ERead() function synchronously, or asynchronously
  1363.       without a completion address in my rParams.EParms1.ioCompletion
  1364.       field, ERead() properly retrieves the packet;
  1365.     - If I use the ERead() function asynchronously with a completion
  1366.       address specified, then deliberately abort the read request with
  1367.       an EDetach() call prior to receipt of a packet, my completion routine
  1368.       is triggered properly and rParams.EParms1.ioStatus takes on the
  1369.       expected value of -1105;
  1370.     but...
  1371.     - If I use the ERead() function asynchronously with a completion
  1372.       address specified, then wait for packet receipt, then one of two
  1373.       things will happen:
  1374.         - if I attempt to update a global variable, the variable will
  1375.           not be updated;
  1376.         - however, if I attempt to print a brief message in the
  1377.           completion routine, the system crashes.
  1378.  
  1379. The pertinent pieces of code...
  1380.  
  1381. /*
  1382.  * [include files]
  1383.  */
  1384.  
  1385. void completion();
  1386. static short flag = 0;
  1387.  
  1388. main()
  1389. {
  1390. /*
  1391.  * [find NuBus Ethernet card, open it]
  1392.  * [attach to protocol type 0, using default protocol handler]
  1393.  * [set up ERead parameters...]
  1394.  */
  1395.     rParams.EParms1.ioCompletion = (ProcPtr)completion;
  1396. /*
  1397.  * [issue ERead()]
  1398.  * [wait for rParams.EParms1.ioStatus to change from 1]
  1399.  * [print details of packet received]
  1400.  * [issue EDetach()]
  1401.  */
  1402.     printf( "flag: %d\n", flag );
  1403. }
  1404.  
  1405. void completion()
  1406. {
  1407.     flag = 1;
  1408.         /* updated only if EDetach() sends control here */
  1409. /***    printf( "received packet\n" );    /**/
  1410.         /* above line crashes Mac if compiled and if packet received,
  1411.            but prints properly if compiled and EDetach() aborts the
  1412.            ERead() request */
  1413. }
  1414.  
  1415.  
  1416. Has anyone else run into problems along these lines?  Am I missing something
  1417. obvious?
  1418.  
  1419. Any help would be apprieciated.
  1420. --
  1421. Tony Nardo,           INET: trn@warper.jhuapl.edu, trn@aplcen.apl.jhu.edu
  1422.  Johns Hopkins Univ./APL   UUCP: {backbone!}mimsy!aplcen!trn
  1423.  
  1424.  
  1425.  
  1426. - -------------------------
  1427.  
  1428. From: jcav@quads.uchicago.edu (JohnC)
  1429. Subject:  ERead() completion woes
  1430. Date: 24 Jan 92 20:01:34 GMT
  1431. Organization: The Royal Society for Putting Things on Top of Other Things
  1432.  
  1433. In article <trn.696276179@warper.jhuapl.edu> trn@warper.jhuapl.edu (Tony Nardo) writes:
  1434. >    - If I use the ERead() function asynchronously with a completion
  1435. >      address specified, then wait for packet receipt, then one of two
  1436. >      things will happen:
  1437. >        - if I attempt to update a global variable, the variable will
  1438. >          not be updated;
  1439. >        - however, if I attempt to print a brief message in the
  1440. >          completion routine, the system crashes.
  1441.  
  1442.  
  1443. If you are going to manipulate global variables in interrupt-time code
  1444. (into which category an asynchronous completion routine certainly falls)
  1445. you'll have to make sure your application's A5-world is correctly set up.
  1446. There are two routines included with Mac development systems that enable
  1447. you to do this.  They are SetA5 and SetCurrentA5.  These routines are
  1448. documented in the Memory Manager chapter of Inside Mac 6, although they were
  1449. originally described much earlier in a tech note.  Here are some quick
  1450. definitions:
  1451.  
  1452.  
  1453. FUNCTION SetCurrentA5:longint;
  1454. --returns current value of A5 register
  1455. --sets A5 equal to contents of low-memory global CurrentA5
  1456.  
  1457. FUNCTION SetA5(newA5:longint):longint;
  1458. --sets A5 equal to the specified newA5 value
  1459. --returns previous value of A5
  1460.  
  1461.  
  1462. What you want to do is declare a new parameter block struct which is a
  1463. superset of the .ENET driver parameter block, containing at least one extra
  1464. field at the end, a long word to hold your application's A5 value.  Before
  1465. making the asynchronous call, use SetCurrentA5 to fill it with the correct
  1466. value.  Inside your completion routine, before doing anything else, call
  1467. SetA5, passing the contents of this field, and saving the return value in a
  1468. local variable.  Before returning out of your completion routine, call SetA5
  1469. with the value returned by the first SetA5 call.  This should solve the
  1470. problem.  Of course, there may be additional nasties caused by the way certain
  1471. optimizing compilers play with the processor registers, but that's covered in
  1472. a recent tech note, the number of which I can't recall.  Good luck.
  1473.  
  1474.  
  1475. -- 
  1476. John Cavallino                  |  EMail: jcav@midway.uchicago.edu
  1477. University of Chicago Hospitals |         John_Cavallino@uchfm.bsd.uchicago.edu
  1478. Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
  1479. B0 f++ c+ g+ k s+(+) e+ h- pv   |         Chicago, IL  60637
  1480.  
  1481.  
  1482.  
  1483. - -------------------------
  1484.  
  1485. From: markw@wc.novell.com (Mark Wittenberg)
  1486. Subject:  ERead() completion woes
  1487. Date: 25 Jan 92 01:22:58 GMT
  1488. Organization: Novell, Inc.
  1489.  
  1490. In <trn.696276179@warper.jhuapl.edu> trn@warper.jhuapl.edu (Tony Nardo) writes:
  1491.  
  1492. >    - If I use the ERead() function asynchronously with a completion
  1493. >      address specified, then wait for packet receipt, then one of two
  1494. >      things will happen:
  1495. >        - if I attempt to update a global variable, the variable will
  1496. >          not be updated;
  1497. >        - however, if I attempt to print a brief message in the
  1498. >          completion routine, the system crashes.
  1499.  
  1500. >--
  1501. >Tony Nardo,           INET: trn@warper.jhuapl.edu, trn@aplcen.apl.jhu.edu
  1502. > Johns Hopkins Univ./APL   UUCP: {backbone!}mimsy!aplcen!trn
  1503.  
  1504. Don't forget that the completion routine is called at interrupt time;
  1505. you don't get to touch globals or call routines unless you set up A5,
  1506. and you can't call routines such as printf at all.  Yes, if you're
  1507. sure calling a specific routine will be pc-relative, and you're sure
  1508. that the routine won't touch globals, or qd vars, etc, and you're sure
  1509. that the routine either couldn't possible be already executing or at
  1510. least that it's re-entrant, and your sure that any routine it calls
  1511. guarantees the same things [apply transitive closure here], then
  1512. you don't need to set up A5 before calling it - generally, you need
  1513. to set up A5 first.  (Sorry for the tortured English of that sentence).
  1514.  
  1515. Mark
  1516. - -
  1517. Mark Wittenberg            Voice:        (510) 975-4512
  1518. Novell, Inc.            Internet:    markw@wc.novell.com
  1519. 1340 Treat Blvd. Suite 500    UUCP:        uunet!kinetics!markw
  1520. Walnut Creek, CA 94596        AppleLink:    NOVELL.WCENG
  1521.                 FAX:        (510) 938-2562
  1522.  
  1523.  
  1524.  
  1525. ---------------------------
  1526.  
  1527. End of C.S.M.P. Digest
  1528. **********************
  1529.